package com.zjs.express.mvc.common;


import com.zjs.express.mvc.enumType.ResponseType;

import java.lang.reflect.Method;

/**
 * 处理器：用来将请求和类的方法进行映射
 */
public class Handler {
    /**
     * 处理类对象（比如HelloController类）
     */
    private Object object;

    /**
     * 处理类方法(HelloController.hello())
     */
    private Method method;

    /**
     * 响应类型：文本、视图
     */
    private ResponseType type;

    public Handler() {
    }

    public Handler(Object object, Method method, ResponseType type) {
        this.object = object;
        this.method = method;
        this.type = type;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public ResponseType getType() {
        return type;
    }

    public void setType(ResponseType type) {
        this.type = type;
    }
}
